<include file="Public:header" />
<!--商品列表-->
<div class="pad_lr_10" >
    <form name="searchform" action="{:U(ACTION_NAME)}" method="get" >
    	<div style="padding-top: 30px;"></div>
    <table width="100%" cellspacing="0" class="search_form">
        <tbody>
            <tr>
                <td>
                <div class="explain_col">
			<input type="hidden" name="m" value="admin" />
			<input type="hidden" name="c" value="items" />
			<input type="hidden" name="a" value="index" />
			<input type="hidden" name="menuid" value="{$menuid}" />
			<if condition="$sm neq ''"><input type="hidden" name="sm" value="{$sm}" /></if>
			发布时间 :
			<input type="text" name="time_start" id="J_time_start" class="date" size="12" value="{$search.time_start}">
			-
			<input type="text" name="time_end" id="J_time_end" class="date" size="12" value="{$search.time_end}">
			<div class="bk8"></div>
			&nbsp;&nbsp;关键字 :
			<input name="keyword" type="text" class="input-text" size="25" value="{$search.keyword}" />
			<input type="submit" name="search" class="btn" value="搜索" />	
			
			<a href="javascript:void(0);" style="background-color: #F15134; color: #FFFFFF;" class="btn J_confirmurl" data-uri="{:u('pdditems/clearall')}" data-acttype="ajax" data-msg="你确定要删除所有商品吗？">清空所有商品</a>
			<div style="padding-top: 10px;"></div>
			
                </div>
                </td>
            </tr>
        </tbody>
    </table>
    </form>
 

    <div class="J_tablelist table_list" data-acturi="{:U('pdditems/ajax_edit')}">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
                <th width=25><input type="checkbox" id="checkall_t" class="J_checkall"></th>
                <th width="20"><span data-tdtype="order_by" data-field="id">ID</span></th>
		<th width="50" align="center">缩略图</th>
                <th align="left"><span data-tdtype="order_by" data-field="title">商品名称</span></th>
                <th width="60"><span data-tdtype="order_by" data-field="cate_id">分类</span></th>
                <th width="100">店铺</th>
                <th width="70"><span data-tdtype="order_by" data-field="coupon_price">活动价(元)</span></th>
		<th width="70"><span data-tdtype="order_by" data-field="coupon_rate">优惠券金额</span></th>
		<th width="90"><span data-tdtype="order_by" data-field="volume">已购买人数</span></th>
                <th width="40"><span data-tdtype="order_by" data-field="ordid">{:L('sort_order')}</span></th>
		<th width="120"><span data-tdtype="order_by" data-field="coupon_start_time">活动时间</span></th>
                <th width="120"><span data-tdtype="order_by" data-field="add_time">发布时间</span></th>
                <th width="80">{:L('operations_manage')}</th>
            </tr>
        </thead>
    	<tbody>
            <volist name="list" id="val" >
            <tr>
                <td align="center"><input type="checkbox" class="J_checkitem" value="{$val.id}"></td>
                <td align="center">{$val.id}</td>
                <td align="right">
                    <div class="img_border"><a href="http://mobile.yangkeduo.com/goods2.html?goods_id={$val.goods_id}" target="_blank"><img src="{$val.goods_thumbnail_url}" width="32" width="32" class="J_preview" data-bimg="{:$val['goods_image_url']}"></a></div>
                </td>
                <td align="left"><span data-tdtype="edit" data-field="title" data-id="{$val.id}" class="tdedit" style="color:{$val.colors};">{$val.goods_name}</span></td>
                <td align="center"><b>{$cate_list[$val['category_id']]}</b></td>
                <td align="center">{$val.mall_name}</td>
                <td align="center" class="red">{$val.min_group_price}</td> 
		<td align="center" class="red">{$val.coupon_discount}</td> 
		<td align="center"><span data-tdtype="edit" data-field="volime" data-id="{$val.id}" class="tdedit">{$val.sold_quantity}</span></td>
                <td align="center"><span data-tdtype="edit" data-field="ordid" data-id="{$val.id}" class="tdedit">{$val.orderid}</span></td>
                <td align="center">{$val.coupon_start_time|date="m-d H:i",###}</td>
		<td align="center">{$val.addtime|frienddate}</td>
                <td align="center"><a href="javascript:void(0);" class="J_confirmurl" data-uri="{:u('pdditems/delete', array('id'=>$val['id']))}" data-acttype="ajax" data-msg="{:sprintf(L('confirm_delete_one'),$val['goods_name'])}">{:L('delete')}</a></td>
            </tr>
            </volist>
    	</tbody>
    </table>
    </div>
    <div class="btn_wrap_fixed">
        <label class="select_all mr10"><input type="checkbox" name="checkall" class="J_checkall">{:L('select_all')}/{:L('cancel')}</label>
        <input type="button" class="btn" data-tdtype="batch_action" data-acttype="ajax" data-uri="{:U('pdditems/delete')}" data-name="id" data-msg="{:L('confirm_delete')}" value="{:L('delete')}" />
        <div id="pages">{$page}</div>
    </div>
</div>
<include file="Public:footer" />
<link rel="stylesheet" href="__STATIC__/js/calendar/calendar-blue.css"/>
<script src="__STATIC__/js/calendar/calendar.js"></script>
<script>
Calendar.setup({
	inputField : "J_time_start",
	ifFormat   : "%Y-%m-%d",
	showsTime  : false,
	timeFormat : "24"
});
Calendar.setup({
	inputField : "J_time_end",
	ifFormat   : "%Y-%m-%d",
	showsTime  : false,
	timeFormat : "24"
});
$('.J_preview').preview(); //查看大图
$('.J_cate_select').cate_select({top_option:lang.all}); //分类联动
$('.J_tooltip[title]').tooltip({offset:[10, 2], effect:'slide'}).dynamic({bottom:{direction:'down', bounce:true}});
</script>
</body>
</html>